﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Tron
{
    class RepeatGameTypeScoreHelper
    {
        public List<int> TotalScores { get; private set; }

        public RepeatGameTypeScoreHelper()
        {
            TotalScores = new List<int>();
            for(int i = 0; i < Constants.PlayerColors.Count; i++)
            {
                TotalScores.Add(0);
            }
        }

        public void AddScoresToTotals(List<int> scores)
        {
            for (int i = 0; i < scores.Count; i++)
            {
                TotalScores[i] += scores[i];
            }
        }

        public override string ToString()
        {
            String s = "";
            for(int i = 0; i < TotalScores.Count; i++)
            {
                int score = TotalScores[i];
                s += Constants.PlayerNames[i] + " total score: " + TotalScores[i] + "\n";
            }
            return s;
        }
    }
}
